package com.etc.service;

import com.etc.entity.po.FlashGoodsMessagePo;
import com.etc.rabbitmq.FlashMessage;
import com.etc.vo.FlashGoodsDetialMessageVo;
import com.etc.vo.OrderMessageVo;

import java.util.List;

/**
 * 文件名:com.etc.service.FlashGoodsService
 * 描述：秒杀商品业务接口
 * 作者:吴仕泉
 * 时间:2019/5/24 19:38
 */
public interface FlashGoodsService {

    //根据活动ID查询参加该活动的所有商品信息
    public List<FlashGoodsMessagePo> selectFlashSaleGoodsMessageBySaleId(Integer saleId);

    //根据秒杀商品ID查询该商品的相关信息
    public FlashGoodsDetialMessageVo selectFlashGoodsDetialMeaasageByFlashGoodsId(Integer fgId);

    //根据用户的Id与用户所要秒杀的商品ID创建对应的隐藏路径
    public String bulidPath(Integer uId,Integer fgId);

    //判断用户请求的路径是否合法
    public boolean judgePath(Integer uId,Integer fgId,String path);

    //判断用户提交的订单是否在秒杀时间之内
    public boolean judgeFlashGoodsTime(Integer fgId);

    //入消息队列数据格式转化
    public FlashMessage orderMessageVoReturnFlashMessage(OrderMessageVo omv,String address);

}
